<?php //debug($this->name) ?>
<!DOCTYPE html>
<html>
<head>
    <?php echo $this->Html->charset(); ?>
    <title>
        <?php echo $title_for_layout; ?>
    </title>

   <?php echo $this->Html->meta('icon');

            echo $this->Html->css(array(
                'admin_cake.org',
                'admin_reset',
                'admin_text',
                'admin_grid',
                'admin_layout',
                'admin_nav',
                'jquery.jqplot.min'
            ));
            echo $this->Html->script(array(
                'admin/jquery-1.6.4.min',
                'admin/jquery-ui/jquery.ui.core.min',
                'admin/jquery-ui/jquery.ui.widget.min',
                'admin/jquery-ui/jquery.ui.accordion.min',
                'admin/jquery-ui/jquery.effects.core.min',
                'admin/jquery-ui/jquery.effects.slide.min',
                'admin/jqPlot/jquery.jqplot.min',
                'admin/jqPlot/plugins/jqplot.barRenderer.min',
                'admin/jqPlot/plugins/jqplot.pieRenderer.min',
                'admin/jqPlot/plugins/jqplot.categoryAxisRenderer.min',
                'admin/jqPlot/plugins/jqplot.highlighter.min',
                'admin/jqPlot/plugins/jqplot.pointLabels.min',
                'admin/setup'

            ));
            echo $this->fetch('meta');
            echo $this->fetch('css');
            echo $this->fetch('script');
        ?>

    <!--[if IE 6]><link rel="stylesheet" type="text/css" href="css/ie6.css" media="screen" /><![endif]-->
    <!--[if IE 7]><link rel="stylesheet" type="text/css" href="css/ie.css" media="screen" /><![endif]-->

    <script type="text/javascript">
        $(document).ready(function () {
            setupLeftMenu(
                 <?php
                if($this->name=='Products'){
                    echo 0;
                }elseif($this->name=='Sales'|| $this->name=='ProductSales'){
                    echo 1;
                }elseif($this->name=='Banners'){
                    echo 2;
                }elseif($this->name=='Categories'){
                    echo 3;
                }elseif($this->name=='Providers'){
                    echo 4;
                }elseif($this->name=='Groups'){
                    echo 5;
                }elseif($this->name=='Users'){
                    echo 6;
                }else{
                    echo 0;
                }
                ?>
            );
            setSidebarHeight();
        });
    </script>

</head>
<body>
    <div class="container_12">
        <div class="grid_12 header-repeat">
            <div id="branding">
                <div class="floatleft">
              <?php echo $this->Html->image('admin/logo.png', array('alt' => 'Logo')); ?>
                 </div>
                <div class="floatright">
                    <div class="floatleft">
              <?php echo $this->Html->image('admin/img-profile.jpg', array('alt' => 'Profile Pic')); ?>
                    </div>
                    <div class="floatleft marginleft10">
                        <ul class="inline-ul floatleft">
                            <li>Hello Admin</li>
                            <li><?php echo $this->Html->link(__('Logout'), array('controller'=>'users','action' => 'logout')); ?></li>
                        </ul>
                        <br />
                        <!-- <span class="small grey">Last Login: 3 hours ago</span> -->
                    </div>
                </div>
                <div class="clear">
                </div>
            </div>
        </div>
        <div class="clear">
        </div>
        <div class="grid_12">
            <ul class="nav main">
                <li class="ic-dashboard"><a href="#"><span>Dashboard</span></a> </li>
                <li class="ic-form-style"><a href="javascript:"><span>Controls</span></a>
                    <ul>
                        <li><a href="form-controls.html">Forms</a> </li>
                        <li><a href="buttons.html">Buttons</a> </li>
                        <li><a href="form-controls.html">Full Page Example</a> </li>
                        <li><a href="table.html">Page with Sidebar Example</a> </li>
                    </ul>
                </li>
                <li class="ic-typography"><a href="#"><span>Typography</span></a></li>
                <li class="ic-charts"><a href="#"><span>Charts & Graphs</span></a></li>
                <li class="ic-grid-tables"><a href="#"><span>Data Table</span></a></li>
                <li class="ic-gallery dd"><a href="javascript:"><span>Image Galleries</span></a>
                     <ul>
                        <li><a href="#">Pretty Photo</a> </li>
                        <li><a href="#">Gallery with Filter</a> </li>
                    </ul>
                </li>
                <li class="ic-notifications"><a href="#"><span>Notifications</span></a></li>

            </ul>
        </div>
        <div class="clear">
        </div>
        <div class="grid_2">
            <div class="box sidemenu">
                <div class="block" id="section-menu">
                    <ul class="section menu">
                         <li><a class="menuitem">Product Controllers</a>
                            <ul class="submenu">
                                <li><?php echo $this->Html->link(__('Add Product'), array('controller'=>'products','action' => 'add','admin'=>true)); ?></li>
                                <li><?php echo $this->Html->link(__('List Products'), array('controller'=>'products','action' => 'index', 'admin'=>true)); ?></li>
                                <li><?php echo $this->Html->link(__('Add New Products'), array('controller'=>'news','action' => 'add', 'admin'=>true)); ?></li>
                                <li><?php echo $this->Html->link(__('List New Products'), array('controller'=>'news','action' => 'index', 'admin'=>true)); ?></li>

                            </ul>
                        </li>
                         <li><a class="menuitem">Sale Controllers</a>
                            <ul class="submenu">
                                <li><?php echo $this->Html->link(__('Add Sales Product'), array('controller'=>'ProductSales','action' => 'add','admin'=>true)); ?></li>
                                <li><?php echo $this->Html->link(__('List Sales Product'), array('controller'=>'ProductSales','action' => 'index','admin'=>true)); ?></li>
                                <li><?php echo $this->Html->link(__('Add Sale'), array('controller'=>'sales','action' => 'add','admin'=>true)); ?></li>
                                <li><?php echo $this->Html->link(__('List Sales'), array('controller'=>'sales','action' => 'index')); ?></li>
                            </ul>
                        </li>
                         <li><a class="menuitem">Banner Controllers</a>
                            <ul class="submenu">
                                <li><?php echo $this->Html->link(__('Add Banner'), array('controller'=>'banners','action' => 'add','admin'=>true)); ?></li>
                                <li><?php echo $this->Html->link(__('List Banners'), array('controller'=>'banners','action' => 'index')); ?></li>

                            </ul>
                        </li>
                         <li><a class="menuitem">Categories Controllers</a>
                            <ul class="submenu">
                                <li><?php echo $this->Html->link(__('Add Category'), array('controller'=>'categories', 'action' => 'add', 'admin'=>true)); ?></li>
                                <li><?php echo $this->Html->link(__('List Categories'), array('controller'=>'categories', 'action' => 'index', 'admin'=>true)); ?></li>

                            </ul>
                        </li>

                        <li><a class="menuitem">Provider Controllers</a>
                            <ul class="submenu">
                                <li><?php echo $this->Html->link(__('New Provider'), array('controller'=>'providers','action' => 'add')); ?></li>
                                <li><?php echo $this->Html->link(__('List Providers'), array('controller'=>'providers','action' => 'index')); ?></li>
                            </ul>
                        </li>

                        <li><a class="menuitem">Group Controllers</a>
                            <ul class="submenu">
                                <li><?php echo $this->Html->link(__('New Groups'), array('controller'=>'groups','action' => 'add')); ?></li>
                                <li><?php echo $this->Html->link(__('List Groups'), array('controller'=>'groups','action' => 'index')); ?></li>
                            </ul>
                        </li>

                        <li><a class="menuitem">User Controlers</a>
                            <ul class="submenu">
                                <li><?php echo $this->Html->link(__('New User'), array('controller'=>'users','action' => 'add')); ?> </li>
                                <li><?php echo $this->Html->link(__('List Users'), array('controller'=>'users','action' => 'index')); ?></li>
                                <li><a>Permission</a> </li>
                            </ul>
                        </li>
                    </ul>
                </div>
            </div>
        </div>


        <div class="grid_10">
        <?php echo $this->Session->flash(); ?>

        <?php echo $this->fetch('content'); ?>

        </div>



        <div class="clear">
        </div>
    </div>

    <div class="clear"> </div>
    <div id="site_info">
        <p>
            Copyright <a href="#">Admin</a>. All Rights Reserved.
        </p>
    </div>
</body>
</html>
